import assert from 'node:assert/strict';

import { describe, it } from 'vitest';

import { request } from '../test-helpers/context.ts';

describe('req.header', () => {
  it('should return the request header object', () => {
    const req = request();
    assert.deepStrictEqual(req.header, req.req.headers);
  });

  it('should set the request header object', () => {
    const req = request();
    req.header = {
      'X-Custom-Headerfield': 'Its one header, with headerfields',
    };
    assert.deepStrictEqual(req.header, req.req.headers);
  });
});
